<?php

    /*
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    */

    class HT_Model_administrator_models_contestaward extends Zend_Db_Table {//ten class fai viet hoa

        protected $_db;

        public function __construct() {
            $this->_name = "contest_award";
            $this->_db = Zend_Registry::get('dbMain');
            parent::init();
        }
        public function getAll($where){
            $sql = "select * from contest_award where ".$where;                        
            $retval = $this->_db->fetchAll($sql);        
            return $retval;
        }
        
        public function findById($id){
            $sql = "select * from contest_award where id = $id";
            $retval = $this->_db->fetchRow($sql);
            return $retval;
        }        

    }

?>
